Skip to content

Conversation

@fellanonymous
Copy link

@blauente

if arr[j] < arr[smallest_index]:
smallest_index = j
# TO-DO: swap
arr[cur_index], arr[smallest_index] = arr[smallest_index], arr[cur_index]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job with the inline swapping syntax.

smallest_index = j
# TO-DO: swap
arr[cur_index], arr[smallest_index] = arr[smallest_index], arr[cur_index]
return arr

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works! Great job on this function.

arr[cur_index - 1] = arr[cur_index]
arr[cur_index] = temp
cur_index -= 1
return arr

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm happy to say you got this one working, too. Maybe today you can work on quicksort in the recursive file. 😄

JulieGumerman added a commit to JulieGumerman/Sorting that referenced this pull request Jan 18, 2020
stackBlock pushed a commit to CS-Full-time/Sorting that referenced this pull request Apr 15, 2020
@fellanonymous fellanonymous closed this by deleting the head repository Jan 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants